import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
 {
path:"/",
redirect:'/login',
 },
  {
    path:'/login',
    name:"login",
    component:()=>import ("../views/login.vue")
  },
  {
    path:"/pages",
    name:"pages",
    component:()=>import ("../views/pages/index.vue"),
    redirect:'/bacground',
    children:[{
      path:"/bacground",
      name:"bacground",
      component:()=>import ("../views/pages/bacground.vue")
    },
    {
      path:"/poth",
      name:"poth",
      component:()=>import ("../views/pages/poth.vue")
    },
    {
      path:"/shoplist",
      name:"shoplist",
      component:()=>import ("../views/pages/shoplist.vue")
    },
   
  ]

  },

  {
    path:"/shop",
    name:"shop",
    component:()=>import("../views/shop/index.vue"),
    children:[
      {
      path:"/shoplists",
      name:"shoplists",
      component:()=>import("../views/shop/shoplists")
    },
    {
      path:"/classlist",
      name:"classlist",
      component:()=>import("../views/shop/classlist")
    },
    {
      path:"/spec",
      name:"spec",
      component:()=>import("../views/shop/spec")
    },
    {
      path:"/comment",
      name:"comment",
      component:()=>import("../views/shop/comment")
    },
    {
      path:"/genres",
      name:"genres",
      component:()=>import("../views/shop/genres")
    },
    
    
  ]
  },
  {
    path:"/order",
    name:"order",
    component:()=>import("../views/order/index.vue"),
    children:[
      {
        path:"/orders",
        name:"orders",
        component:()=>import("../views/order/orders.vue")
      },
      {
        path:"/bill",
        name:"bill",
        component:()=>import("../views/order/bill.vue")
      },
      {
        path:"/after",
        name:"after",
        component:()=>import("../views/order/after.vue")
      },

    ]
  },
  {
    path:"/member",
    name:"member",
    component:()=>import("../views/member/index.vue"),
    children:[
      {
        path:"/memberlist",
        name:"memberlist",
        component:()=>import("../views/member/memberlist.vue")
    },
    {
      path:"/grade",
      name:"grade",
      component:()=>import("../views/member/grade.vue")
  },
  ]
  }
  
  

]

const router = new VueRouter({
  routes
})

export default router
